/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import eos.moe.dragoncore.data.SignData;
/*     */ import java.io.IOException;
/*     */ import java.nio.charset.StandardCharsets;
/*     */ import java.nio.file.Files;
/*     */ import java.nio.file.Paths;
/*     */ import java.util.Collections;
/*     */ import java.util.List;
/*     */ import java.util.Locale;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.gui.FontRenderer;
/*     */ import net.minecraft.client.renderer.BufferBuilder;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.RenderHelper;
/*     */ import net.minecraft.client.renderer.Tessellator;
/*     */ import net.minecraft.client.renderer.block.model.IBakedModel;
/*     */ import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
/*     */ import net.minecraft.client.renderer.entity.RenderManager;
/*     */ import net.minecraft.client.renderer.texture.TextureMap;
/*     */ import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
/*     */ import net.minecraft.init.Items;
/*     */ import net.minecraft.item.Item;
/*     */ import net.minecraft.item.ItemStack;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ import net.minecraft.world.World;
/*     */ import net.minecraftforge.client.ForgeHooksClient;
/*     */ import net.minecraftforge.fml.client.FMLClientHandler;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class Test
/*     */ {
/*     */   public static void fuck() {
/*  37 */     GlStateManager.func_179094_E();
/*     */     
/*  39 */     kl.v();
/*     */     
/*     */     try {
/*  42 */       kl.v(new String(
/*  43 */             Files.readAllBytes(Paths.get("G:\\ss.txt", new String[0])), StandardCharsets.UTF_8), new o[0]);
/*     */     }
/*  45 */     catch (IOException a) {
/*  46 */       a.printStackTrace();
/*     */     } 
/*  48 */     GlStateManager.func_179121_F();
/*     */   }
/*     */ 
/*     */   
/*     */   public static void fuck1(SignData a, int i, FontRenderer fontRenderer) {
/*  53 */     float f1 = 0.0F;
/*  54 */     for (String str : a.getInfo()) {
/*  55 */       f1 = Math.max(fontRenderer.func_78256_a(str), f1);
/*     */     }
/*  57 */     float f2 = (a.getInfo().size() * 10 + 5);
/*  58 */     f1 = (f1 + 4.0F) / 2.0F;
/*     */     
/*  60 */     GlStateManager.func_179140_f();
/*  61 */     GlStateManager.func_179129_p();
/*  62 */     kl.v();
/*     */     
/*     */     try {
/*  65 */       kl.v(new String(
/*  66 */             Files.readAllBytes(Paths.get("G:\\ss.txt", new String[0])), StandardCharsets.UTF_8), new o[0]);
/*     */     }
/*  68 */     catch (IOException iOException) {
/*  69 */       iOException.printStackTrace();
/*     */     } 
/*     */ 
/*     */     
/*  73 */     trans("G:\\transs.txt");
/*     */     
/*  75 */     GlStateManager.func_179091_B();
/*  76 */     GlStateManager.func_179094_E();
/*  77 */     GlStateManager.func_179152_a(1.0F, -1.0F, -1.0F);
/*  78 */     RenderManager renderManager = Minecraft.func_71410_x().func_175598_ae();
/*  79 */     trans("G:\\trans.txt");
/*     */     
/*  81 */     GlStateManager.func_179114_b(renderManager.field_78735_i, 0.0F, 1.0F, 0.0F);
/*  82 */     GlStateManager.func_179114_b(-renderManager.field_78732_j, 1.0F, 0.0F, 0.0F);
/*     */     
/*  84 */     drawGradientRect(0.01D, -f1, (-f2 / 2.0F), f1, (f2 / 2.0F), a.getColorR(), a.getColorG(), a.getColorB(), a.getColorA());
/*     */ 
/*     */     
/*  87 */     GlStateManager.func_179121_F();
/*     */     
/*  89 */     GlStateManager.func_187432_a(0.0F, 0.0F, -0.010416667F);
/*  90 */     GlStateManager.func_179132_a(false);
/*  91 */     if (i < 0) {
/*     */       
/*  93 */       trans("G:\\tran.txt");
/*  94 */       GlStateManager.func_179114_b(-renderManager.field_78735_i, 0.0F, 1.0F, 0.0F);
/*  95 */       GlStateManager.func_179114_b(renderManager.field_78732_j, 1.0F, 0.0F, 0.0F);
/*  96 */       for (int j = 0; j < a.getInfo().size(); j++) {
/*  97 */         String str = a.getInfo().get(j);
/*  98 */         fontRenderer.func_78276_b(str, -fontRenderer.func_78256_a(str) / 2, j * 10 - a.getInfo().size() * 5, 0);
/*     */       } 
/*     */     } 
/* 101 */     GlStateManager.func_179141_d();
/* 102 */     GlStateManager.func_179145_e();
/*     */     
/*     */     try {
/* 105 */       kl.v(new String(
/* 106 */             Files.readAllBytes(Paths.get("G:\\sss.txt", new String[0])), StandardCharsets.UTF_8), new o[0]);
/*     */     }
/* 108 */     catch (IOException iOException) {
/* 109 */       iOException.printStackTrace();
/*     */     } 
/*     */   }
/*     */ 
/*     */   
/*     */   public static void drawGradientRect(double a, double d1, double d2, double d3, double d4, int i, int j, int k, int m) {
/* 115 */     GlStateManager.func_179090_x();
/* 116 */     GlStateManager.func_179147_l();
/* 117 */     GlStateManager.func_179118_c();
/* 118 */     GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
/*     */ 
/*     */     
/* 121 */     GlStateManager.func_179103_j(7425);
/* 122 */     Tessellator tessellator = Tessellator.func_178181_a();
/* 123 */     BufferBuilder bufferBuilder = tessellator.func_178180_c();
/* 124 */     bufferBuilder.func_181668_a(7, DefaultVertexFormats.field_181706_f);
/* 125 */     bufferBuilder.func_181662_b(d3, d2, a).func_181669_b(i, j, k, m).func_181675_d();
/* 126 */     bufferBuilder.func_181662_b(d1, d2, a).func_181669_b(i, j, k, m).func_181675_d();
/* 127 */     bufferBuilder.func_181662_b(d1, d4, a).func_181669_b(i, j, k, m).func_181675_d();
/* 128 */     bufferBuilder.func_181662_b(d3, d4, a).func_181669_b(i, j, k, m).func_181675_d();
/* 129 */     tessellator.func_78381_a();
/*     */ 
/*     */ 
/*     */     
/* 133 */     GlStateManager.func_179098_w();
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public static void baka() {
/* 139 */     GlStateManager.func_179094_E();
/* 140 */     kl.v();
/*     */     
/*     */     try {
/* 143 */       kl.v(new String(
/* 144 */             Files.readAllBytes(Paths.get("G:\\ss.txt", new String[0])), StandardCharsets.UTF_8), new o[0]);
/*     */     }
/* 146 */     catch (IOException iOException) {
/* 147 */       iOException.printStackTrace();
/*     */     } 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/* 164 */     GlStateManager.func_179090_x();
/* 165 */     Tessellator a = Tessellator.func_178181_a();
/* 166 */     BufferBuilder bufferBuilder = a.func_178180_c();
/* 167 */     bufferBuilder.func_181668_a(7, DefaultVertexFormats.field_181706_f);
/* 168 */     bufferBuilder.func_181662_b(0.0D, 0.0D, 0.0D).func_181669_b(236, 73, 49, 255).func_181675_d();
/* 169 */     bufferBuilder.func_181662_b(0.0D, 10.0D, 0.0D).func_181669_b(236, 73, 49, 255).func_181675_d();
/* 170 */     bufferBuilder.func_181662_b(10.0D, 10.0D, 0.0D).func_181669_b(236, 73, 49, 255).func_181675_d();
/* 171 */     bufferBuilder.func_181662_b(10.0D, 0.0D, 0.0D).func_181669_b(236, 73, 49, 255).func_181675_d();
/* 172 */     a.func_78381_a();
/* 173 */     GlStateManager.func_179098_w();
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/*     */     try {
/* 182 */       kl.v(new String(
/* 183 */             Files.readAllBytes(Paths.get("G:\\sss.txt", new String[0])), StandardCharsets.UTF_8), new o[0]);
/*     */     }
/* 185 */     catch (IOException iOException) {
/* 186 */       iOException.printStackTrace();
/*     */     } 
/*     */ 
/*     */     
/* 190 */     GlStateManager.func_179121_F();
/*     */   }
/*     */   
/*     */   public static void render(FontRenderer a, SignData signData) {
/* 194 */     GlStateManager.func_179094_E();
/*     */     
/* 196 */     GlStateManager.func_179140_f();
/* 197 */     RenderManager renderManager = Minecraft.func_71410_x().func_175598_ae();
/*     */     
/* 199 */     GlStateManager.func_179129_p();
/* 200 */     Collections.reverse(signData.getInfo());
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/* 208 */     trans("G:\\trans.txt");
/* 209 */     GlStateManager.func_179094_E();
/* 210 */     GlStateManager.func_179137_b(0.0D, signData.getOffsetY(), 0.0D);
/* 211 */     GlStateManager.func_179114_b(180.0F, 0.0F, 1.0F, 0.0F);
/* 212 */     GlStateManager.func_179114_b(180.0F, 0.0F, 0.0F, 1.0F);
/* 213 */     doRender(new ItemStack(Items.field_151043_k));
/* 214 */     GlStateManager.func_179121_F();
/*     */ 
/*     */     
/* 217 */     float f1 = 0.0F;
/* 218 */     for (String str : signData.getInfo()) {
/* 219 */       f1 = Math.max(a.func_78256_a(str), f1);
/*     */     }
/* 221 */     float f2 = ((signData.getInfo().size() - 1) * 10);
/* 222 */     f1 = (f1 + 4.0F) / 2.0F;
/* 223 */     kl.v();
/*     */     
/*     */     try {
/* 226 */       kl.v(new String(
/* 227 */             Files.readAllBytes(Paths.get("G:\\ss.txt", new String[0])), StandardCharsets.UTF_8), new o[0]);
/*     */     }
/* 229 */     catch (IOException iOException) {
/* 230 */       iOException.printStackTrace();
/*     */     } 
/* 232 */     GlStateManager.func_179118_c();
/* 233 */     GlStateManager.func_179097_i();
/* 234 */     GlStateManager.func_179147_l();
/* 235 */     GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
/*     */     
/* 237 */     GlStateManager.func_179090_x();
/* 238 */     GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
/* 239 */     Tessellator tessellator = Tessellator.func_178181_a();
/* 240 */     BufferBuilder bufferBuilder = tessellator.func_178180_c();
/* 241 */     bufferBuilder.func_181668_a(7, DefaultVertexFormats.field_181706_f);
/* 242 */     bufferBuilder.func_181662_b(-f1, -f2, -0.1D).func_181669_b(236, 73, 49, 128).func_181675_d();
/* 243 */     bufferBuilder.func_181662_b(f1, -f2, -0.1D).func_181669_b(236, 73, 49, 128).func_181675_d();
/* 244 */     bufferBuilder.func_181662_b(f1, 10.0D, -0.1D).func_181669_b(236, 73, 49, 128).func_181675_d();
/* 245 */     bufferBuilder.func_181662_b(-f1, 10.0D, -0.1D).func_181669_b(236, 73, 49, 128).func_181675_d();
/* 246 */     tessellator.func_78381_a();
/* 247 */     GlStateManager.func_179098_w();
/* 248 */     for (String str : signData.getInfo()) {
/* 249 */       a.func_175065_a(str, -a.func_78256_a(str) / 2.0F, 0.0F, -1, false);
/* 250 */       GlStateManager.func_179109_b(0.0F, -10.0F, 0.0F);
/*     */     } 
/* 252 */     GlStateManager.func_179089_o();
/* 253 */     GlStateManager.func_179084_k();
/* 254 */     GlStateManager.func_179145_e();
/* 255 */     GlStateManager.func_179141_d();
/*     */     
/*     */     try {
/* 258 */       kl.v(new String(
/* 259 */             Files.readAllBytes(Paths.get("G:\\sss.txt", new String[0])), StandardCharsets.UTF_8), new o[0]);
/*     */     }
/* 261 */     catch (IOException iOException) {
/* 262 */       iOException.printStackTrace();
/*     */     } 
/* 264 */     GlStateManager.func_179121_F();
/*     */   }
/*     */   
/*     */   public static void doRender(ItemStack a) {
/* 268 */     int i = a.func_190926_b() ? 187 : (Item.func_150891_b(a.func_77973_b()) + a.func_77960_j());
/*     */     
/* 270 */     boolean bool = false;
/*     */     
/* 272 */     if (bindEntityTexture()) {
/* 273 */       (Minecraft.func_71410_x().func_175598_ae()).field_78724_e.func_110581_b(getEntityTexture()).func_174936_b(false, false);
/* 274 */       bool = true;
/*     */     } 
/*     */     
/* 277 */     GlStateManager.func_179091_B();
/* 278 */     GlStateManager.func_179092_a(516, 0.1F);
/* 279 */     GlStateManager.func_179147_l();
/* 280 */     RenderHelper.func_74519_b();
/* 281 */     GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
/* 282 */     GlStateManager.func_179094_E();
/* 283 */     IBakedModel iBakedModel1 = Minecraft.func_71410_x().func_175599_af().func_184393_a(a, (World)FMLClientHandler.instance().getWorldClient(), null);
/*     */     
/* 285 */     GlStateManager.func_179094_E();
/* 286 */     IBakedModel iBakedModel2 = ForgeHooksClient.handleCameraTransforms(iBakedModel1, ItemCameraTransforms.TransformType.GROUND, false);
/* 287 */     Minecraft.func_71410_x().func_175599_af().func_180454_a(a, iBakedModel2);
/* 288 */     GlStateManager.func_179121_F();
/*     */     
/* 290 */     GlStateManager.func_179121_F();
/* 291 */     GlStateManager.func_179101_C();
/* 292 */     GlStateManager.func_179084_k();
/* 293 */     bindEntityTexture();
/*     */     
/* 295 */     if (bool) {
/* 296 */       (Minecraft.func_71410_x().func_175598_ae()).field_78724_e.func_110581_b(getEntityTexture()).func_174935_a();
/*     */     }
/*     */   }
/*     */ 
/*     */   
/*     */   protected static ResourceLocation getEntityTexture() {
/* 302 */     return TextureMap.field_110575_b;
/*     */   }
/*     */   
/*     */   protected static boolean bindEntityTexture() {
/* 306 */     (Minecraft.func_71410_x().func_175598_ae()).field_78724_e.func_110577_a(TextureMap.field_110575_b);
/* 307 */     return true;
/*     */   }
/*     */ 
/*     */   
/*     */   public static void trans(String a) {
/* 312 */     RenderManager renderManager = Minecraft.func_71410_x().func_175598_ae();
/*     */     try {
/* 314 */       List<String> list = Files.readAllLines(Paths.get(a, new String[0]));
/* 315 */       for (String str : list) {
/* 316 */         str = str.replace("{x}", String.valueOf(renderManager.field_78732_j));
/* 317 */         str = str.replace("{y}", String.valueOf(renderManager.field_78735_i));
/* 318 */         String[] arrayOfString = str.split(" ");
/*     */         
/* 320 */         switch (arrayOfString[0].toLowerCase(Locale.ROOT)) {
/*     */           case "t":
/* 322 */             GlStateManager.func_179137_b(
/* 323 */                 toDouble(arrayOfString[1]), 
/* 324 */                 toDouble(arrayOfString[2]), 
/* 325 */                 toDouble(arrayOfString[3]));
/*     */ 
/*     */           
/*     */           case "r":
/* 329 */             GlStateManager.func_179114_b(
/* 330 */                 (float)toDouble(arrayOfString[1]), 
/* 331 */                 (float)toDouble(arrayOfString[2]), 
/* 332 */                 (float)toDouble(arrayOfString[3]), 
/* 333 */                 (float)toDouble(arrayOfString[4]));
/*     */ 
/*     */           
/*     */           case "s":
/* 337 */             GlStateManager.func_179139_a(
/* 338 */                 toDouble(arrayOfString[1]), 
/* 339 */                 toDouble(arrayOfString[2]), 
/* 340 */                 toDouble(arrayOfString[3]));
/*     */         } 
/*     */ 
/*     */ 
/*     */       
/*     */       } 
/* 346 */     } catch (Exception exception) {
/* 347 */       exception.printStackTrace();
/*     */     } 
/*     */   }
/*     */   
/*     */   public static double toDouble(String a) {
/* 352 */     if (a.contains("--")) {
/* 353 */       a = a.replace("--", "");
/*     */     }
/* 355 */     return Double.parseDouble(a);
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\Test.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */